/**
 * @date 2006-7-10
 */

package org.nanhill.moo.service;

import org.nanhill.commons.model.pagination.Pagination;
import org.nanhill.commons.pattern.search.SearchException;
import org.nanhill.moo.domain.Favor;

/**
 * @author alin [xalinx at gmail dot com]
 * @date 2006-7-10
 */
public interface FavorService {

	/**
	 * Open new favor.
	 * 
	 * @param favor
	 */
	void open(Favor favor);

	/**
	 * Load favor by favor id.
	 * 
	 * @param favorId
	 * @return
	 */
	Favor loadById(long favorId);

	/**
	 * Remove favor by favor id.
	 * 
	 * @param favorId
	 */
	void removeById(long favorId);

	/**
	 * Latest favor Pagination.
	 * 
	 * @param pageId
	 * @return
	 * @throws SearchException
	 */
	Pagination<Favor> loadPageLatest(int pageId, int pageSize, long costId,
			long userId, long categoryId) throws SearchException;

}
